class sysinit::snmp {
  
  $snmp_community = $sysinit::snmp_community
  $snmp_server    = $sysinit::snmp_server

  package { ['net-snmp','net-snmp-utils']:
    ensure => installed,
  }

  service { 'snmpd':
    ensure     => running,
    enable     => true,
    hasrestart => true,
    hasstatus  => true,
  }

  file { '/etc/snmp/snmpd.conf':
    owner   => root,
    group   => root,
    mode    => '0600',
    content => template('sysinit/snmpd.conf.erb'),
    notify  => Service[snmpd],
    require => Package['net-snmp','net-snmp-utils'];
  }
}